<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.box01{
			width: 200px;
			height:200px;
			background-color:gold;
		}

		.box02{
			width: 300px;
			height:300px;
			background-color:red;
		}

	</style>
	<script type="text/javascript">
		window.onload = function(){

			var oDiv = document.getElementById('div1');
			oDiv.className = 'box02';


		}


	</script>

</head>
<body>
	<div class="box01" id="div1"></div>
</body>
</html>